(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
admit(x, nil) → nil
admit(x, .(u, .(v, .(w, z)))) → cond(=(sum(x, u, v), w), .(u, .(v, .(w, admit(carry(x, u, v), z)))))
cond(true, y) → y
Rewrite Strategy: FULL
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
admit(x, .(u, .(v, .(w, z)))) →+ cond(=(sum(x, u, v), w), .(u, .(v, .(w, admit(carry(x, u, v), z)))))
gives rise to a decreasing loop by considering the right hand sides subterm at position [1,1,1,1].
The pumping substitution is [z / .(u, .(v, .(w, z)))].
The result substitution is [x / carry(x, u, v)].
(2) BOUNDS(n^1, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
admit(x, nil) → nil
admit(x, .(u, .(v, .(w, z)))) → cond(='(sum(x, u, v), w), .(u, .(v, .(w, admit(carry(x, u, v), z)))))
cond(true, y) → y
S is empty.
Rewrite Strategy: FULL
(5) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
admit/0
='/0
='/1
sum/0
sum/1
sum/2
carry/0
carry/1
carry/2
(6) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
admit(nil) → nil
admit(.(u, .(v, .(w, z)))) → cond(=', .(u, .(v, .(w, admit(z)))))
cond(true, y) → y
S is empty.
Rewrite Strategy: FULL
(7) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(8) Obligation:
TRS:
Rules:
admit(nil) → nil
admit(.(u, .(v, .(w, z)))) → cond(=', .(u, .(v, .(w, admit(z)))))
cond(true, y) → y
Types:
admit :: nil:. → nil:.
nil :: nil:.
. :: w → nil:. → nil:.
w :: w
cond :: =':true → nil:. → nil:.
=' :: =':true
true :: =':true
hole_nil:.1_0 :: nil:.
hole_w2_0 :: w
hole_=':true3_0 :: =':true
gen_nil:.4_0 :: Nat → nil:.
(9) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
admit
(10) Obligation:
TRS:
Rules:
admit(
nil) →
niladmit(
.(
u,
.(
v,
.(
w,
z)))) →
cond(
=',
.(
u,
.(
v,
.(
w,
admit(
z)))))
cond(
true,
y) →
yTypes:
admit :: nil:. → nil:.
nil :: nil:.
. :: w → nil:. → nil:.
w :: w
cond :: =':true → nil:. → nil:.
=' :: =':true
true :: =':true
hole_nil:.1_0 :: nil:.
hole_w2_0 :: w
hole_=':true3_0 :: =':true
gen_nil:.4_0 :: Nat → nil:.
Generator Equations:
gen_nil:.4_0(0) ⇔ nil
gen_nil:.4_0(+(x, 1)) ⇔ .(w, gen_nil:.4_0(x))
The following defined symbols remain to be analysed:
admit
(11) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
admit(
gen_nil:.4_0(
+(
3,
*(
3,
n6_0)))) →
*5_0, rt ∈ Ω(n6
0)
Induction Base:
admit(gen_nil:.4_0(+(3, *(3, 0))))
Induction Step:
admit(gen_nil:.4_0(+(3, *(3, +(n6_0, 1))))) →RΩ(1)
cond(=', .(w, .(w, .(w, admit(gen_nil:.4_0(+(3, *(3, n6_0)))))))) →IH
cond(=', .(w, .(w, .(w, *5_0))))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(12) Complex Obligation (BEST)
(13) Obligation:
TRS:
Rules:
admit(
nil) →
niladmit(
.(
u,
.(
v,
.(
w,
z)))) →
cond(
=',
.(
u,
.(
v,
.(
w,
admit(
z)))))
cond(
true,
y) →
yTypes:
admit :: nil:. → nil:.
nil :: nil:.
. :: w → nil:. → nil:.
w :: w
cond :: =':true → nil:. → nil:.
=' :: =':true
true :: =':true
hole_nil:.1_0 :: nil:.
hole_w2_0 :: w
hole_=':true3_0 :: =':true
gen_nil:.4_0 :: Nat → nil:.
Lemmas:
admit(gen_nil:.4_0(+(3, *(3, n6_0)))) → *5_0, rt ∈ Ω(n60)
Generator Equations:
gen_nil:.4_0(0) ⇔ nil
gen_nil:.4_0(+(x, 1)) ⇔ .(w, gen_nil:.4_0(x))
No more defined symbols left to analyse.
(14) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
admit(gen_nil:.4_0(+(3, *(3, n6_0)))) → *5_0, rt ∈ Ω(n60)
(15) BOUNDS(n^1, INF)
(16) Obligation:
TRS:
Rules:
admit(
nil) →
niladmit(
.(
u,
.(
v,
.(
w,
z)))) →
cond(
=',
.(
u,
.(
v,
.(
w,
admit(
z)))))
cond(
true,
y) →
yTypes:
admit :: nil:. → nil:.
nil :: nil:.
. :: w → nil:. → nil:.
w :: w
cond :: =':true → nil:. → nil:.
=' :: =':true
true :: =':true
hole_nil:.1_0 :: nil:.
hole_w2_0 :: w
hole_=':true3_0 :: =':true
gen_nil:.4_0 :: Nat → nil:.
Lemmas:
admit(gen_nil:.4_0(+(3, *(3, n6_0)))) → *5_0, rt ∈ Ω(n60)
Generator Equations:
gen_nil:.4_0(0) ⇔ nil
gen_nil:.4_0(+(x, 1)) ⇔ .(w, gen_nil:.4_0(x))
No more defined symbols left to analyse.
(17) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
admit(gen_nil:.4_0(+(3, *(3, n6_0)))) → *5_0, rt ∈ Ω(n60)
(18) BOUNDS(n^1, INF)